package com.fenghen.demo01.controller;

import com.fenghen.config.Result;
import com.fenghen.demo01.client.CodeGeneratorFeignClient;
import com.fenghen.entity.CodeGeneratorConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/demo1")
public class Demo1Controller {

    @Autowired
    private CodeGeneratorFeignClient codeGeneratorFeignClient;

    @PostMapping("/generate-code-in-demo1")
    public Result generateCodeInDemo1(@RequestBody CodeGeneratorConfig config) {
        return codeGeneratorFeignClient.generateCode(config);
    }
}